package com.gxa.luckin.core.pojo;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.persistence.*;
import java.io.Serializable;
import java.util.Date;

/**
 * 商品实体类和
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@Table(name = "tb_commodity")
@ApiModel("商品的实体类型")
public class Commodity implements Serializable {
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Column(name = "commodity_id")
    @ApiModelProperty(name="id",value = "商品编号id")
    private Long id;
    @Column(name ="commodity_name")
    @ApiModelProperty(name="title",value = "商品名称")
    private String name;
    @Column(name ="commodity_price")
    @ApiModelProperty(name="price",value = "商品价格")
    private Double price;
    @Column(name ="status")
    @ApiModelProperty(name="status",value = "商品的状态")
    private Integer status;//上架。下架。
    @Column(name ="commodity_image")
    @ApiModelProperty(name="image",value = "商品图片")
    private String image;
    @Column(name ="commodity_images")
    @ApiModelProperty(name="images",value = "商品图片列表")
    private String images;
    @Column(name ="commodity_introduction")
    @ApiModelProperty(name="introduction",value = "商品介绍")
    private String introduction;
    @Column(name ="commodity_items")
    @ApiModelProperty(name="items",value = "商品规格列表")
    private String items;
    @Column(name ="commodity_paraitems")
    @ApiModelProperty(name="paraitems",value = "商品参数。详情")
    private String paraitems;
    @Column(name ="commodity_well")
    @ApiModelProperty(name="well",value = "商品销量")
    private Integer well;
    @Column(name ="commodity_comment")
    @ApiModelProperty(name="comment",value = "商品评论数")
    private String comment;
    @Column(name ="commodity_num")
    @ApiModelProperty(name="num",value = "商品库存")
    private String num;
    @Column(name ="create_time")
    @ApiModelProperty(name="create_time",value = "商品创建时间")
    private Date create_time;
    @Column(name ="update_time")
    @ApiModelProperty(name="update_time",value = "商品更新时间")
    private Date update_time;
    @Column(name ="category_id")
    @ApiModelProperty(name="update_time",value = "类目id")
    private Integer category_id;
    @Column(name ="good_id")
    @ApiModelProperty(name="update_time",value = "类目id")
    private Integer pid;
    @Column(name ="position")
    @ApiModelProperty(name="position",value = "首页商品转换轮换位置")
    private String position;
    /**
     * 元气满满
     */
    public static final String HOME="home";
    /**
     * 兴瑞自营
     */
    public static final String JD="jiadian";
    /**
     * 糕点零食
     */
    public static final String SJ="shouji";
}
